#include("../template/_layout.html")
#@layout()

#define content()
<div class="container" style="margin-top: 30px;">
	<form action="/brower/search" method="post" class="form-inline">
		<div class="form-group">
			<label for="keywordInput">关键字</label>
			<input type="text" name="keyword" value="#(keyword)" class="form-control" id="keywordInput" style="width:auto">
		</div>
		<div class="checkbox">
			<label>
			<input type="checkbox" name="r18only" value="true" #if(r18only=="true") checked #end > R-18
			</label>
		</div>
		<button type="submit" class="btn btn-default">搜索</button>
	</form>
	#if(showResult=="true")
    <div style="margin-top: 10px;"></div>
	<table class="table table-hover">
		<thead>
		<tr>
			<th>标题</th>
			<th>标签</th>
			<th>收藏数</th>
			<th>预览</th>
		</tr>
		</thead>
		<tbody>
		#for(illust : results)
		<tr>
			<td>#(illust.title)</td>
            <td>#(illust.tags)</td>
            <td>#(illust.bookmark)</td>
            <td><a href="https://www.pixiv.net/member_illust.php?mode=medium&illust_id=#(illust.id)" target="_blank">Pixiv</a></td>
		</tr>
		#end
		</tbody>
	</table>
	#end
</div>
#end